<template>
  <el-card class="box-card">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="充值金额">
        <el-input v-model="form.rechargeamount"></el-input>
      </el-form-item>
        <el-form-item label="充值方式">
          <el-select v-model="form.rechargemethod" placeholder="选择充值方式">
            <el-option label="现金" value="1"></el-option>
            <el-option label="信用卡" value="2"></el-option>
            <el-option label="微信" value="3"></el-option>
            <el-option label="支付宝" value="4"></el-option>
          </el-select>
        </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button @click="cancel">取消</el-button>
      </el-form-item>
    </el-form>
  </el-card>
</template>

<script>

  import { increase } from '@/network/member'

  export default {
    name: 'MemberTop-up',
    methods: {
      onSubmit() {
        console.log(this.form)
        increase(this.form).then(res => {
          this.$router.back(1)
        })
      },
      cancel() {
        this.$router.back(1)
      }
    },
    data() {
      return {
        form: {
          userid: window.sessionStorage.getItem("loginid"),
          memberid:window.sessionStorage.getItem("memberid")
        }
      }
    }
  }
</script>

<style scoped>

</style>
